<template>
    <div class="personal-statistics">
        <div class="search-box">
            <div class="left">
                <p class="search-info">统计对象：<span>{{user.userName}}</span><span>{{user.mobile}}</span></p>
            </div>
            <div class="right">
                <el-form :inline="true" :model="searchData" class="demo-form-inline" size="small">
                    <el-form-item label="">
                        <el-input v-model="searchData.user" required placeholder="输入BD姓名"></el-input>
                    </el-form-item>
                    <el-form-item label="">
                        <el-input v-model="searchData.mobile" required placeholder="输入BD电话"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="onSubmit" size="small">查询</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </div>
        <div class="day-data">
            <el-table
                    :data="dayData"
                    border
                    style="width: 100%">
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="newUsers"
                        label="新拓展用户">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="newUserPayNum"
                        label="新用户下单数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="oldUserPayNum"
                        label="老用户下单数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="userPayNum"
                        label="下单总数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="cancelPayNum"
                        label="取消单数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="allPayMoney"
                        label="总消费金额">
                </el-table-column>
            </el-table>
        </div>
        <div class="all-data">
            <el-table
                    :data="allData"
                    border
                    style="width: 100%">
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="date"
                        label="">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="newUsers"
                        label="新拓展用户">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="newUserPayNum"
                        label="新用户下单数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="oldUserPayNum"
                        label="老用户下单数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="userPayNum"
                        label="下单总数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="finishPayNum"
                        label="完成单数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="cancelPayNum"
                        label="取消单数">
                </el-table-column>
                <el-table-column
                        align="center"
                        header-align="center"
                        prop="allPayMoney"
                        label="总消费金额">
                </el-table-column>
            </el-table>
        </div>
     <lar-table></lar-table>
    </div>
</template>

<script>
    export default {
        name: "index",
        data() {
            return {
                user:{
                    userName:'张三',
                    mobile:13388998888
                },
                searchData: {
                    user: '',
                    mobile: ''
                },
                dayData:[{
                    newUsers:0,
                    newUserPayNum:0,
                    oldUserPayNum:0,
                    userPayNum:0,
                    finishPayNum:0,
                    cancelPayNum:0,
                    allPayMoney:0
                }],
                allData:[{
                    time:1,
                    newUsers:0,
                    newUserPayNum:0,
                    oldUserPayNum:0,
                    userPayNum:0,
                    finishPayNum:0,
                    cancelPayNum:0,
                    allPayMoney:0
                }]
            }
        },
        methods: {
            onSubmit() {
                console.log('submit!');
            }
        }
    }
</script>

<style scoped>
    .search-box{
        overflow: hidden;
        background-color: #fff;
        margin: 10px;
        padding: 18px 10px 0;
    }
    .left{
        float: left;
    }
    .right{
        float: right;
    }
    .search-info{
        height: 32px;
        line-height: 32px;
        font-size: 16px;
    }
    .search-info span{
        margin: 0 10px 0 5px;
    }
    .demo-form-inline{
        overflow: hidden;
    }
    .all-data,.day-data{
        padding:10px;
    }
</style>
